chore: bump pyo3 from 0.27.2 to 0.28.3 - #6259
Conversation
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.27.2 to 0.28.3. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](PyO3/pyo3@v0.27.2...v0.28.3) --- updated-dependencies: - dependency-name: pyo3 dependency-version: 0.28.3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
prql-bot
left a comment
There was a problem hiding this comment.
The bump itself resolves correctly, but pyo3 0.28 deprecates the automatic FromPyObject impl for #[pyclass] types that derive Clone, and CompileOptions in prqlc/bindings/prqlc-python/src/lib.rs is exactly that. The 📎 Clippy step in test-rust.yaml runs with -D warnings, so this turns the deprecation into a hard error and test-rust will fail once the queued matrix gets a runner:
error: use of deprecated associated constant `pyo3::impl_::deprecated::HasAutomaticFromPyObject::<true>::MSG`
--> prqlc/bindings/prqlc-python/src/lib.rs:102:1
|
102 | #[pyclass]
Reproduced locally with cargo clippy -p prqlc-python --all-targets -- -D warnings (exit 101). from_py_object is the migration to take rather than skip_from_py_object — compile and rq_to_sql both take Option<CompileOptions> as a #[pyfunction] parameter, and test_all.py passes prqlc.CompileOptions(...) into both, so dropping the derive would break the public API at runtime. Since nobody is here to act on the suggestion, I've pushed it:
// prqlc/bindings/prqlc-python/src/lib.rs, on `pub struct CompileOptions`
#[pyclass(from_py_object)]
#[derive(Clone, Debug)]Two other things worth a maintainer's eye, neither blocking this PR:
pyo3-build-config is left at 0.27.1 (Cargo.toml line 58), so the lock now carries two copies of it. The effect is cosmetic today — build.rs only calls add_extension_module_link_args() — but #6258 proposes moving it to 0.29.2, which would leave the build-config crate a major ahead of pyo3 itself. 0.28.3 is the version that matches; #6258 is worth redirecting there (or closing in favour of a bump alongside this one).
abi3-py37 is why this stops at 0.28.3. pyo3 0.29 removed that feature (its lowest is abi3-py38, and it added abi3-py315), which is why Dependabot capped the bump here rather than going to 0.29.2. pyproject.toml already declares requires-python = ">=3.10", so moving the feature to abi3-py310 would both match what the package claims to support and unblock the next pyo3 major — but it narrows the ABI floor of a published wheel, so that's a call for a maintainer rather than something to fold into a dependency bump.
Other 0.28 migration items, checked against this codebase
From pyo3's 0.28 migration guide:
- Free-threaded Python is now opt-out.
#[pymodule]no longer needsgil_used = false; theprqlcmodule will now declare that it doesn't require the GIL. Checked the compiler's process-global state for this:prqlcusesOnceLock(sql/operators.rs,sql/keywords.rs,codegen/ast.rs,utils/mod.rs,lib.rs) and oneRwLock<Option<DebugLog>>(debug/log.rs) — allSync, nostatic mutor non-Syncstatics — and the bindings expose no way to start the debug log, so this looks safe. - Multi-phase module initialization — upstream states no migration needed.
Py::from_owned_ptrdeprecations,PyClassInitializerFromimpl removal,PyBuffer→PyUntypedBuffer— none of these APIs are used here.- Removed transitive deps (
indoc,memoffset,unindent) have no direct dependents in this workspace. - MSRV: pyo3 0.28 requires Rust 1.83; the workspace is on 1.85.0.
cargo test -p prqlc-pythonpasses (5 tests) with the fix applied.
pyo3 0.28 deprecates the automatic `FromPyObject` impl for `#[pyclass]` types that derive `Clone`, which the clippy step's `-D warnings` turns into a build error. `compile` and `rq_to_sql` both take `Option<CompileOptions>`, so the derive is opted into rather than skipped.
Bumps pyo3 from 0.27.2 to 0.28.3.
Release notes
Sourced from pyo3's releases.
... (truncated)
Changelog
Sourced from pyo3's changelog.
... (truncated)
Commits
743af64release: 0.28.32042b4cfix deadlock when initializing enum viainto_pyobject()(#5928)0157247ci: update UI tests for Rust 1.94 (#5859)e234f8aUpdate getting-started.md (#5899)c06848dfix ffi-check in 3.15.0a7 (#5873)83f4283remove unusedtry_trait_v2feature when enabling thenightlyfeature (#5868)0de57edFix unsoundness inPyBytesWriter::write_vectored(#5907)49cd13ffixes #5900 -- address race condition with initialization and site.py loading...c90d163[fix] Fixstd::ffiimport for_Py_NegativeRefcount(#5847)b79d725fix(pyo3-macros): allow pyclass named Probe (#5837)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)